from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import create_app, db
from config import *

# 创建app，并传入配置模式：
app = create_app(DevelopmentConfig)
# Flask-script
manager = Manager(app)
# 数据迁移
Migrate(app, db)
manager.add_command("db", MigrateCommand)


@app.route('/')
def hello_world():
    return "hello_world"

if __name__ == '__main__':
    app.run()